home *** CD-ROM | disk | FTP | other *** search
/ MacTech 1 to 12 / MacTech-vol-1-12.toast / Source / MacTech® Magazine / Volume 10 - 1994 / 10.03 Mar 94 / StackTranslators / HyperTalk Script < prev    next >
Encoding:
Text File  |  1994-02-15  |  779 b   |  33 lines  |  [TEXT/MPS ]

  1. on translateStack stackName,newFileName,componentSubType
  2.   open file newFileName
  3.   if the result is not empty then
  4.     answer the result
  5.     exit translateStack
  6.   end if
  7.   
  8.   lock screen
  9.   lock messages
  10.   lock recent
  11.   push card
  12.   go stack stackName
  13.   if the result is not empty then exit translateStack
  14.   
  15.   push card
  16.   repeat with i = 1 to the number of cards
  17.     go card i
  18.     repeat with j = 1 to the number of card fields
  19.       write card field j & return & return to file newFileName
  20.     end repeat
  21.     repeat with k = 1 to the number of bg fields
  22.       write bg field k & return & return to file newFileName
  23.     end repeat
  24.   end repeat
  25.   close file newFileName
  26.   pop card
  27.   pop card
  28.   unlock recent
  29.   unlock messages
  30.   unlock screen
  31.   close card window
  32. end translateStack
  33.